package com.itboye.jigongbao.utils

import android.app.Activity
import com.itboye.jigongbao.R
import com.itboye.jigongbao.base.BaseActivity
import com.itboye.jigongbao.widget.titlebarwidget.TranslucentActionBar

/**
 * Created by Administrator on 2017/11/28.
 */
class TitleBarUtils {
    fun initTitlebarStyle1(activity: Activity, actionBar: TranslucentActionBar, title: String, leftIcon: Int, strLeft: String, rightIcon: Int, strRight: String) {
        //初始actionBar
        actionBar.setData(title, leftIcon, strLeft, rightIcon, strRight, null)
        //开启渐变
        //        actionBar.setNeedTranslucent();
        //设置状态栏高度
        actionBar.setStatusBarHeight((activity as BaseActivity).getStatusBarHeight())
        actionBar.setBarBackgroundColor(activity.resources.getColor(R.color.main_blue))
    }


}